package org.dromara.hm.domain.bo;

import com.baomidou.mybatisplus.annotation.TableId;
import org.dromara.hm.domain.HmSaleOrderPickUp;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import org.dromara.common.translation.annotation.Translation;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.hm.domain.HmSaleOrderRefund;

/**
 * 销售订单提货、回款业务对象 hm_sale_order_pick_up
 *
 * @author Hzy
 * @date 2025-01-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HmSaleOrderPickUp.class, reverseConvertGenerate = false)
public class HmSaleOrderPickUpBo extends BaseEntity {

    /**
     * 提货记录id
     */
    @NotNull(message = "提货记录id不能为空", groups = { EditGroup.class })
    private Long pickUpId;


    /**
     * 销售单产品ID
     */
    private Long saleProductId;

    /**
     * 销售订单
     */
    @NotNull(message = "销售订单不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long saleOrderId;


    /**
     * 提货数量or回款金额
     */
    private BigDecimal pickUpNum;


    /**
     * 处理时间
     */
    @NotNull(message = "处理时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date pickUpTime;

    /**
     * 证明材料
     */
    @NotBlank(message = "证明材料不能为空", groups = { AddGroup.class, EditGroup.class })
    private String file;

    /**
     * 事件类型(提货/回款)
     */
    @NotBlank(message = "类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String pickUpType;

    /**
     * 商品类型
     */
    private String productType;


    /**
     * 状态
     */
    private String status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 开始时间
     */
    private String startTime;

    /**
     * 结束时间
     */
    private String endTime;

    /**
     * 赠品id
     */
    private String giftProductId;

    /**
     * 是否删除(1:删除;0:未删除)
     */
    private Long delFlag;

    /**
     * 是否赠品退货
     */
    private String isGiftReturn;

    /**
     * 退货类型 (1->部分退;2-> 全部退;3-> 仅退款 4-> 仅退货)
     */
    private String returnType;

    /**
     * 赠品退货类型 (1->部分退货;2-> 全部退货)
     */
    private String giftReturnType;

    /**
     * 退款金额
     */
    private BigDecimal refundAmount;

    /**
     * 赠品退货集合
     */
    private List<HmSaleOrderRefundBo> giftReturns;

    /**
     * 是否生成入库待办
     */
    private String isCreateTodo;

    /**
     * 退回数量/金额
     */
    private BigDecimal returnNum;
    /**
     * 关联退款/退货id
     */
    private String relatedRefundId;
    /**
     * 是否关联退款退货单
     */
    private Boolean isRefundRelated;

    /**
     * 回款方式
     */
    private String method;

    /**
     * 是否为补充提货
     */
    private Boolean isSupplementaryPickup;


}
